Document::Open

Section: ET++ method description (n)
Updated: automatically Fri Mar 15 14:13:05 1991
Index Return to Main Contents
 

NAME

Document::Open - instance method  

TEMPLATE

newDocOpened = bool Open()  

SPECIFIERS

public virtual  

DESCRIPTION

Open first checks what to do with unsaved changes (see method AlertChanges). Then it opens the load file dialog. When the user selects a file the method CanLoadDocument checks whether it can be loaded. If this is the case the file is loaded by the method Load. If the method CanLoadDocument returns FALSE, then a new document is created by passing the name of the file to the method Application::OpenDocument. Method is rarely overridden.  

ARGUMENTS

none

 

RETURN ARGUMENT

bool newDocOpened

It is TRUE
if a new document has actually been opened. It is FALSE if the user cancelled the operation, did not select a file or storing unsaved changes by the method Save failed.
 

CATEGORIES

menu commands, client interface

 

FIRST DEFINITION

class Document  

FILES

implementation:
Document.C

 

KNOWN PROBLEMS

The command gResetUndo is performed in any case; but it may only be performed after another file has successfully been loaded. The statement Load(...) should be changed to if (Load(...)) PerformCommand(gResetUndo); or Load itself should execute gResetUndo. See also method Load.


 

Index

NAME
TEMPLATE
SPECIFIERS
DESCRIPTION
ARGUMENTS
RETURN ARGUMENT
CATEGORIES
FIRST DEFINITION
FILES
KNOWN PROBLEMS

This document was created by man2html, using the manual pages.
Time: 00:40:27 GMT, March 30, 2022